# 2 types of variables
# local variables with the function scope
# global variables with the file scope
message = "b"


def great():
    if True:
        message = 'a'  # can be accessed in this entire function
        # message isn't the messsage defined above
        # so that message won't be changed
        message_another = "b"
        # but not outside of this function
    print(message)
    return (message, message_another)


def modified_global_message():
    # Avoid this
    global message
    message = "abc"  # here message refers to the global one
    # don't do this, this may cause side effects


great()
# print(message_another) # Undefined variable 'message_another' pylint(undefined-variable)
print(message)  # message is still "b"
